package net.xgclass.online_xgclass.mapper;

import net.xgclass.online_xgclass.model.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

        int save(User user);

    User findByPhone(@Param("phone") String phone);


    User findByPhoneAndPwd(@Param("phone") String phone, @Param("pwd") String pwd);

    User findByUserId(@Param("user_id") Integer userId);

    User findByUserAndPwd(@Param("name") String name, @Param("pwd") String pwd);

    List<User> findUser();

    List<User> findUser(String byname);

    int deleteById(Integer id);

    int addUser(User user);

    int updateById(User user);
}
